package com.ruoyi.ncpsy.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 上架销售对象 ncpsy_product_sale
 * 
 * @author ruoyi
 * @date 2025-11-13
 */
public class NcpsyProductSale extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 关联的用户ID */
    @Excel(name = "关联的用户ID")
    private Long userId;

    /** 关联的作物ID */
    @Excel(name = "关联的作物ID")
    private Long cropId;

    /** 销售价格（保留两位小数） */
    @Excel(name = "销售价格", readConverterExp = "保=留两位小数")
    private BigDecimal price;

    /** 上架时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shelfTime;

    /** 商品图片URL */
    @Excel(name = "商品图片URL")
    private String imageUrl;

    /** 上架库存数量 */
    @Excel(name = "上架库存数量")
    private Long stockQuantity;

    /** 状态（1-在售，2-下架，3-售罄） */
    @Excel(name = "状态", readConverterExp = "1=-在售，2-下架，3-售罄")
    private Long status;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 关联的仓储产品ID */
    @Excel(name = "关联的仓储产品ID")
    private Long wareId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setCropId(Long cropId) 
    {
        this.cropId = cropId;
    }

    public Long getCropId() 
    {
        return cropId;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setShelfTime(Date shelfTime) 
    {
        this.shelfTime = shelfTime;
    }

    public Date getShelfTime() 
    {
        return shelfTime;
    }

    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }

    public void setStockQuantity(Long stockQuantity) 
    {
        this.stockQuantity = stockQuantity;
    }

    public Long getStockQuantity() 
    {
        return stockQuantity;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setWareId(Long wareId) 
    {
        this.wareId = wareId;
    }

    public Long getWareId() 
    {
        return wareId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("cropId", getCropId())
            .append("price", getPrice())
            .append("shelfTime", getShelfTime())
            .append("imageUrl", getImageUrl())
            .append("stockQuantity", getStockQuantity())
            .append("status", getStatus())
            .append("description", getDescription())
            .append("wareId", getWareId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
